package cn.ruituo.adv4;


import java.io.FileInputStream;
import java.io.IOException;

public class ReadFile3 {
    public static void main(String[] args) {
        FileInputStream fin = null;
        try {
            fin = new FileInputStream("E:\\temp\\java72-java\\README.md");
             //小文件
            byte b[]=new byte[fin.available()];//可用
            int len=fin.read(b);//一次读完
            System.out.println(new String(b,0,len));


        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if (fin != null)
                    fin.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
